home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 7 / FM Towns Free Software Collection 7.iso / taropyon / guilib3 / inc / fscf.h < prev    next >
C/C++ Source or Header  |  1993-11-30  |  6KB  |  209 lines

  1. #ifndef    _FSCF_H
  2. #define    _FSCF_H
  3.  
  4. /*    ファイルセレクタ,ダイアログの大きさと,表示位置    */
  5. #define    FS_DLG_XS    (56*8)
  6. #define    FS_DLG_YS    (34*8)
  7. #define    FS_DLG_X0    (DspCtrl.scinf[DspCtrl.writePage].dlgArea.x1+\
  8.                     (DspCtrl.scinf[DspCtrl.writePage].dlgArea.x2-\
  9.                      DspCtrl.scinf[DspCtrl.writePage].dlgArea.x1-FS_DLG_XS)/2)
  10. #define    FS_DLG_Y0    (DspCtrl.scinf[DspCtrl.writePage].dlgArea.y1+\
  11.                     (DspCtrl.scinf[DspCtrl.writePage].dlgArea.y2-\
  12.                      DspCtrl.scinf[DspCtrl.writePage].dlgArea.y1-FS_DLG_YS)/2)
  13.  
  14. /*    各部品の表示位置    */
  15. #define    FS_INF_X(x)        (fs->dlg->fr.x0+8+(x))
  16. #define    FS_INF_Y(y)        (fs->dlg->fr.y0+9*8+(y))
  17. #define    FS_GST_X(x)        (fs->dlg->fr.x0 + 8    + (x))
  18. #define    FS_GST_Y(y)        (fs->dlg->fr.y0 + 29*8 + (y))
  19. #define    FS_GST_FLDSIZ    (54)
  20. #define    FS_SORT_X(x)    (fs->dlg->fr.x0+4+49*8+(x))
  21. #define    FS_SORT_Y(y)    (fs->dlg->fr.y0+   5*8+(y))
  22. #define    FS_WILD_X(x)    (fs->dlg->fr.x0+4+49*8+(x))
  23. #define    FS_WILD_Y(y)    (fs->dlg->fr.y0-1+ 7*8+(y))
  24. #define    FS_SBAR_X(x)    (fs->dlg->fr.x0+ 53*8 +(x))
  25. #define    FS_SBAR_Y(y)    (fs->dlg->fr.y0+(12*8)+(y))
  26. #define    FS_SBAR_XS        (16)
  27. #define    FS_SBAR_YS        (8*16)
  28. #define    FS_DRV_X(d,x)    (fs->dlg->fr.x0+  8+((d)%8)*6*8+(x))
  29. #define    FS_DRV_Y(d,y)    (fs->dlg->fr.y0+5*8+((d)/8)*15 +(y))
  30. #define    FS_SCN_X(x)        (fs->dlg->fr.x0+8+(x))
  31. #define    FS_SCN_Y(y)        (fs->dlg->fr.y0+(12*8)+(y))
  32. #define    FS_RET_X(x)        (fs->dlg->fr.x0+52*8+(x))
  33. #define    FS_RET_Y(y)        (fs->dlg->fr.y0+31*8+4+(y))
  34. #define    FS_EXT_X(n,x)    (fs->dlg->fr.x0+8+(n)*6*8+(x))
  35. #define    FS_EXT_Y(n,y)    (fs->dlg->fr.y0+32*8+2+(y))
  36. #define    FS_CHD_X(x)        (FS_RET_X(-6*8-16)+(x))
  37. #define    FS_CHD_Y(y)        (fs->dlg->fr.y0+32*8+2+(y))
  38.  
  39. /*        --------------- ------------    イベンド配置位置    */
  40. #define    FS_BTN_EXIT        (1)
  41. #define    FS_BTN_RET        (4)
  42. #define    FS_PARTS_MOVE    (7)
  43. #define    FS_BTN_SORT        (8)
  44. #define    FS_PF_SORT        (9)
  45. #define    FS_BTN_WILD        (10)
  46. #define    FS_PF_WILD        (11)
  47.  
  48. #define    FS_BTN_MKDIR    (12)
  49. #define    FS_BTN_RENAM    (13)
  50. #define    FS_BTN_DEL        (14)
  51. #define    FS_BTN_COPY        (15)
  52. #define    FS_BTN_DOS        (16)
  53. #define    FS_PF_MKDIR        (17)
  54. #define    FS_PF_RENAM        (18)
  55. #define    FS_PF_DEL        (19)
  56. #define    FS_PF_COPY        (20)
  57. #define    FS_PF_DOS        (21)
  58.  
  59. #define    FS_BTN_CHD        (22)
  60.  
  61. #define    FS_KEY_NEXT        (24)
  62. #define    FS_KEY_BEFORE    (25)
  63. #define    FS_KEY_HOME        (26)
  64. #define    FS_KEY_TOP        (27)
  65. #define    FS_KEY_LAST        (28)
  66.  
  67. #define    FS_BTN_DRV(no)    (32+(no))
  68. #define    FS_BTN_FILE(no)    (48+(no))
  69. #define    FS_EVT_NUM        80            /* イベント登録数    */
  70.  
  71. /*        --------------- ------------    イベントNo.        */
  72. #define    FS_EVT_EXIT        (9990)
  73. #define    FS_EVT_RET        (9991)
  74. #define    FS_EVT_MOVE        (7)
  75. #define    FS_EVT_SORT        (8)
  76. #define    FS_EVT_WILD        (9)
  77.  
  78. #define    FS_EVT_MKDIR    (12)
  79. #define    FS_EVT_RENAM    (13)
  80. #define    FS_EVT_DEL        (14)
  81. #define    FS_EVT_COPY        (15)
  82. #define    FS_EVT_DOS        (16)
  83.  
  84. #define    FS_EVT_CHD        (22)
  85.  
  86. #define    FS_EVT_NEXT        (24)
  87. #define    FS_EVT_BEFORE    (25)
  88. #define    FS_EVT_TOP        (27)
  89. #define    FS_EVT_LAST        (28)
  90.  
  91.  
  92. #define    FS_EVT_DRV(no)    (no)
  93.  
  94. #define    FS_EVT_DMY        (9996)
  95. #define    FS_EVT_CONTINUE    (9997)
  96.  
  97. /*------------------------------------------------------------------*/
  98. /*    色番号    */
  99. #define    FSCOL_BAC        (C_HWHITE)
  100. #define    FSCOL_SCN        (C_MBLACK)
  101. #define    FSCOL_STR        (C_WHITE)
  102. #define    FSCOL_DIR        (C_YELLOW)
  103. #define    FSCOL_SYS        (C_MAGENTA)
  104. #define    FSCOL_ARC        (C_RED)
  105. #define    FSCOL_SEL        (C_GREEN)
  106. #define    FSCOL_ERR        (C_RED)
  107. #define    FSCOL_INF        (C_CYAN)
  108. #define    FSCOL_CUR        (C_WHITE)
  109. #define    FSCOL_LIN        (C_HBLUE)
  110. #define    FSCOL_ICN        (C_MBLACK)
  111. #define    FSCOL_BOX        (C_HBLACK)
  112. #define    FSCOL_BTN        (C_WHITE)
  113.  
  114. #define    FSWORK_DRV_CHG    (0)
  115. #define    FSWORK_DIR_CHG    (1)
  116. #define    FSWORK_DRV_TOP    (2)
  117.  
  118.  
  119. #define    FSPATH_LEN    (37)    /* 表示可能なパス名の文字数    */
  120.  
  121.  
  122. /*-----    "_fs_dsp.c"    ------------------------------------------------*/
  123. //void    FS_pfkey_dsp( FS_T *fs, int md );
  124. void    FS_wind_cls( FS_T *fs );
  125. void    FS_wind_puts( FS_T *fs, COLOR col, char *s);
  126.  
  127. /*-----    "_fs_chd.c"    ------------------------------------------------*/
  128. int        FS_funcChd( int evtNo, EVTSBJ_T *sbj );
  129.  
  130. /*-----    "_fs_cur.c"    ------------------------------------------------*/
  131. int        FS_curSelect( FS_T *fs );
  132.  
  133. /*-----    "_fs_drv.c"    ------------------------------------------------*/
  134. int        FS_chDrvWork( FS_T *fs );
  135. int        FS_funcDrive( int evtNo, EVTSBJ_T *sbj );
  136. int        FS_drawDrvInf( FS_T *fs );
  137. int        FS_drawDrive( FS_T *fs );
  138.  
  139. /*-----    "_fs_fdsp.c"    --------------------------------------------*/
  140. int        FS_funcFile( int evtNo, EVTSBJ_T *sbj );
  141. void    FS_drawFile( FS_T *fs );
  142.  
  143. /*-----    "_fs_key.c"    ------------------------------------------------*/
  144. int        FS_funcTop( int evtNo, EVTSBJ_T *sbj );
  145. int        FS_funcLast( int evtNo, EVTSBJ_T *sbj );
  146. int        FS_funcNext( int evtNo, EVTSBJ_T *sbj );
  147. int        FS_funcBefore( int evtNo, EVTSBJ_T *sbj );
  148. int        FS_retEnd( FS_T *fs );
  149. int        FS_funcRetkey( int evtNo, EVTSBJ_T *sbj);
  150.  
  151. /*-----    "_fs_read.c"    --------------------------------------------*/
  152. int        FS_readFile( FS_T *fs );
  153. int        FS_pickupFile( FS_T *fs, int *dir_num, int *file_num );
  154. int        FS_readWork( FS_T *fs, int md );
  155.  
  156. /*-----    "_fs_sbar.c"    --------------------------------------------*/
  157. int        FS_funcSbar( int evtNo, SBAR *sb );
  158.  
  159. /*-----    "_fs_sort.c"    --------------------------------------------*/
  160. int        FS_funcSort(int evtNo, EVTSBJ_T *sbj);
  161.  
  162. /*-----    "_fs_wild.c"    --------------------------------------------*/
  163. int        FS_funcWild(int no, EVTSBJ_T *sbj);
  164.  
  165. /*-----    "_fs_ext.c"    ------------------------------------------------*/
  166. int        FS_funcMkdir( int evtNo, EVTSBJ_T *sbj );
  167. int        FS_funcRenam( int evtNo, EVTSBJ_T *sbj );
  168. int        FS_funcDel( int evtNo, EVTSBJ_T *sbj );
  169. int        FS_funcCopy( int evtNo, EVTSBJ_T *sbj );
  170.  
  171. /*-----    "_fs_copy.c"    --------------------------------------------*/
  172. int        FS_funcDos( int evtNo, EVTSBJ_T *sbj );
  173.  
  174. #ifdef    _FS_MAIN
  175. #    define    DRVMAX        (17)
  176.  
  177. #    define    IS_FLP        0x00
  178. #    define    IS_RES        0x01
  179. #    define    IS_SCSI        0x02
  180. #    define    IS_RAM        0x03
  181. #    define    IS_MDC        0x04
  182. #    define    IS_ROM        0x05
  183. #    define    IS_CDR        0x06
  184. #    define    IS_ADD        0x07    /* 追加タイプ???    */
  185. #    define    IS_NON        0xFF
  186.  
  187.     static    UCHAR    DrvType[DRVMAX] =
  188.     {    IS_NON, IS_NON, IS_NON, IS_NON,
  189.         IS_NON, IS_NON, IS_NON, IS_NON,
  190.         IS_NON, IS_NON, IS_NON, IS_NON,
  191.         IS_NON, IS_NON, IS_NON, IS_NON,
  192.         IS_NON
  193.     };
  194.     static char    DspDrv[DRVMAX] =
  195.     {    ERR, ERR, ERR, ERR,
  196.         ERR, ERR, ERR, ERR,
  197.         ERR, ERR, ERR, ERR,
  198.         ERR, ERR, ERR, ERR,
  199.         ERR
  200.     };
  201.     static char    *Dev_name[] =
  202.     {    "FDD", "???", "HDD", "RAM",
  203.         "MDC", "ROM", "CDR", "???",
  204.         "???", "???", "???", "???"
  205.     };
  206. #endif
  207.  
  208. #endif
  209.